<?php
//setup.php

//Russell Matteson
//Shearwalls.com
//September 2011

//SetupMainNav()
//Sets up the context navigation menu for a page, setting the active tab based on the passed string
//Note: The links array should be overridden prior to calling this function
function SetupMainNav($strCurrentID)
{
	//Pick up the main navigation list
	require($_SERVER["DOCUMENT_ROOT"]."/shared/mainnav.php");
	
	//Create the list used to wrap the navigation items
	print '<ul class="buttonlist mainnav">' . "\n";
	foreach ($arrLinks as $strLinkID => $strLink)
	{
		//Mark the current page's link so that it can be displayed differently
		if($strLinkID == $strCurrentID)
			print '				<li class="current">' . $strLink . '</li>' . "\n";
		else
			print '				<li>' . $strLink . '</li>' . "\n";
	}
	print '			</ul>' . "\n";
}

//SetupContextNav()
//Sets up the context navigation menu for a page, setting the active tab based on the passed string
//Note: The links array should be overridden prior to calling this function
function SetupContextNav($strCurrentID)
{
	//Pick up the context navigation list
	require("contextnav.php");
	
	//Create the list used to wrap the navigation items
	print '<ul class="buttonlist contextnav">' . "\n";
	foreach ($arrLinks as $strLinkID => $strLink)
	{
		//Mark the current page's link so that it can be displayed differently
		if($strLinkID == $strCurrentID)
			print '				<li class="current">' . $strLink . '</li>' . "\n";
		else
			print '				<li>' . $strLink . '</li>' . "\n";
	}
	print '			</ul>' . "\n";
}
?>